<script setup lang="ts">
import { ref } from 'vue';
import { useRoute } from 'vue-router';

const route = useRoute();
const id = route.query.id;
console.log(id);

const active = ref(0); // 默认第一个tab

const onChange = (index: number) => {
    active.value = index;
};
</script>

<template>
    <div>
        <van-tabbar v-model="active" @change="onChange" fixed placeholder safe-area-inset-bottom route>
            <van-tabbar-item icon="home-o" to="/game/gameIndex">标签</van-tabbar-item>
            <van-tabbar-item icon="search">标签</van-tabbar-item>
            <van-tabbar-item icon="friends-o">标签</van-tabbar-item>
            <van-tabbar-item icon="setting-o">标签</van-tabbar-item>
        </van-tabbar>
        <router-view />
    </div>

</template>